import time

from selenium.webdriver.common.by import By

from base.Base1 import Base1

class Page_Tushu_Hover(Base1):

    #定位上传文件 //*[@id="uploadFile"]
    updown_file_loc= (By.XPATH,'//*[@id="uploadFile"]')
    #定位提交借阅 //*[@id="borrowForm"]/button
    submit_loc=(By.XPATH,'//*[@id="borrowForm"]/button')

    def move_to_updown(self):
        self.find_element(self.updown_file_loc).send_keys(r"C:\Users\jing\Pictures\微信图片_20250527144100.png")

    def submit(self):
        self.click(self.submit_loc)


    def updown_TuShu_luoji(self):
        self.move_to_updown()
        time.sleep(4)
        self.submit()
        time.sleep(6)